package org.example.download;

import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;

public class FileUtils {
    public static void createFileIfNotExists(String filePath, long fileSize) throws IOException {
        File file = new File(filePath);
        if (!file.exists()) {
            try (RandomAccessFile raf = new RandomAccessFile(file, "rw")) {
                raf.setLength(fileSize);
            }
        }
    }
}